Code conversion method and device for code conversion

ABSTRACT

A method of converting code, which converts first codes based on a first system to second codes based on a second system, is characterized in that, when the first codes are unavailable, the second codes are obtained by directly using speech parameters which are ever decoded in accordance with the first system and are stored.

TECHNICAL FIELD

The present invention relates to a method for converting code and a codeconversion apparatus therefor.

BACKGROUND ART

As a method for encoding a speech signal with high efficiency at amedium or low bit rate, a method is widely used in which the speechsignal is separated into a linear prediction (LP) filter and anexcitation signal that drives the LP filter and then they are encoded.One of the typical methods is a Code Excited Linear Prediction (CELP)method. According to the CELP method, an LP filter is driven by anexcitation signal and hence a synthetic speech signal is obtained. Setin the LP filter are LP coefficients which represent frequencycharacteristics of an input speech. The excitation signal is expressedas a sum of an adaptive code book (ACB) which represents a pitch periodof the input speech and a fixed code book (FCB) which includes randomnumbers and pulses. Here, respective of an ACB component and an FCBcomponent are multiplied by gains (an ACB gain and an FCB gain). TheCELP method is described in a conventional art document No. 1: “Codeexcited linear prediction: High quality speech at very low bit rates”,by M. Schroeder (Proc. of IEEE Int. Conf. on Acoust., Speech and SignalProcessing, pp. 937-940, 1985).

By the way, when considering an interconnection between a 3G mobilenetwork and a cable packet network, for example, there is a problem inthat a direct interconnection is not possible due to the difference in astandard speech coding system between respective networks. Solutions forthe problem include a tandem interconnection.

FIG. 1 shows a configuration of a conventional code conversionapparatus. Codes (first codes) obtained by encoding speech by using afirst speech encoding system (a first system) are converted into codes(second codes) which can be decoded by a second system. The conventionalcode conversion apparatus based on the tandem interconnection will beexplained with reference to FIG. 1. A code demultiplexing circuit 1010demultiplexes the first codes inputted through an input terminal 10 intospeech parameters, namely, codes associated with LP coefficients, anACB, an FCB, an ACB gain and an FCB gain (an LP coefficients code, anACB code, an FCB code and gain code). Here, the ACB gain and the FCBgain are encoded and decoded collectively. For simplicity, these arereferred to as a gain, and the code of the gain is referred to as a gaincode. Also, the LP coefficients code, the ACB code, the FCB code and thegain code are outputted to a speech decoding circuit 1050 as a first LPcoefficients code, a first ACB code, a first FCB code, and a first gaincode, respectively.

It should be noted that a speech code conversion apparatus is disclosedin Japanese Laid Open Patent Application JP-A 2002-202799 (conventionalart document No. 2). The speech decoding circuit 1050 receives the firstLP coefficients code, the first ACB code, the first FCB code and thefirst gain code from the code demultiplexing circuit 1010. The speechdecoding circuit 1050 decodes these codes on the basis of the decodingmethod of the first system to generate the speech, and outputs to aspeech encoding circuit 1060 the decoded speech as a first decodedspeech. The speech encoding circuit 1060 receives the first decodedspeech outputted from the speech decoding circuit 1050. The speechencoding circuit 1060 encodes the first decoded speech on the basis ofthe second decoding method to obtain an LP coefficients code, an ACBcode, an FCB code and a gain code. These codes are outputted to a codemultiplexing circuit 1020 as a second LP coefficients code, a second ACBcode, a second FCB code and a second gain code, respectively.

It should be noted that known as a method of encoding and decodingspeech are the above-mentioned document No. 1 and a conventional artdocument No. 3: “AMR speech codec; Transcoding functions” (3GPP TS26.090).

The code multiplexing circuit 1020 receives the second LP coefficientscode, the second ACB code, the second FCB code and the second gain codeoutputted from the speech encoding circuit 1060. The code multiplexingcircuit 1020 multiplexes these codes, and outputs the thus-generatedcodes as the second codes through an output terminal 20.

Thus, the code conversion is completed. As described below, a method ofcalculating an LSP of the current frame by using a past LSP is shown inthe section 6.2.3 of a conventional art document No. 4: “AMR speechcodec; Error concealment of lost frames” (3GPP TS 26.091).

However, according to the above-mentioned conventional code conversionapparatus, when the first codes are unavailable, a speech signal withdeterioration is produced by using a past speech parameter which hasbeen obtained based on the first system and stored. Then, the speechsignal is reanalyzed and encoded on the basis of the second system, andthereby the second codes are obtained. Therefore, the conventional codeconversion apparatus has a problem that when the first codes areunavailable due to a packet loss and the like, the speech signalobtained by decoding the second codes after the conversion significantlydeteriorates in quality.

Regarding the foregoing description, a speech decoding apparatus isdisclosed in International Publication WO96/37964. The conventionalspeech decoding apparatus has an error detection unit, a firstpresumption unit, a decoding unit, an updating unit, and a secondpresumption unit. The error detection unit compresses a speech signal indigital data by using a predetermined encoding method, and detectswhether there exists a coding error in the received codes or not. Whenan error is detected, the first presumption unit presumes correct codesfrom the codes before the error detection, and outputs the presumedcodes. When the error detection ends after a predetermined period passesafter the error is first detected, the second presumption unit presumescorrect codes during the error is detected, based on the codes receivedafter the error detection ends. Then, the second presumption unitoutputs the correct codes as presumed codes. The decoding unit convertsthe presumed codes into a speech signal on the basis of an internalstate data which the decoding unit stores internally. The updating unitupdates the internal state data based on a result of the decoding.

DISCLOSURE OF INVENTION

Therefore, an object of the present invention is to provide a method forconverting code and a code conversion apparatus therefor which, when thefirst codes are unavailable, can reduce the deterioration in quality ofthe speech signal obtained by decoding the second codes.

Other objects, features and advantages and the like of the presentinvention will be manifested for the persons skilled in the art withreference to the description below.

In an aspect of the present invention, a method of converting code,which converts first codes based on a first system to second codes basedon a second system, is characterized in that, when the first codes areunavailable, the second codes are obtained by directly using speechparameters which are ever decoded in accordance with the first systemand are stored.

The method of converting code includes: a step of obtaining data offirst linear prediction coefficients from the first codes; a step ofobtaining data of first excitation signal from the first codes; a stepof storing the data of first linear prediction coefficients; a step ofstoring the data of first excitation signal; a step of calculating dataof first linear prediction coefficients from past data of first linearprediction coefficients which are stored; a step of calculating data offirst excitation signal from past data of first excitation signal whichare stored; a step of obtaining data of second linear predictioncoefficients from the data of first linear prediction coefficients; anda step of obtaining data of second excitation signal from the data offirst excitation signal.

Also, the method of converting code can include: a step generating afirst speech signal by driving a filter having any of first linearprediction coefficients derived from the data of first linear predictioncoefficients and second linear prediction coefficients derived from thedata of second linear prediction coefficients by using a firstexcitation signal derived from the data of first excitation signal; anda step of obtaining data of second excitation signal from the firstspeech signal and any of the first linear prediction coefficients andthe second linear prediction coefficients.

Also, it is preferable that the data of excitation signal includes anyof an adaptive codebook data, a fixed codebook data and a gain data.

In another aspect of the present invention, a code conversion apparatus,which converts first codes based on a first system to second codes basedon a second system, is characterized in that, when the first codes areunavailable, the second codes are obtained by directly using speechparameters which are ever decoded in accordance with the first systemand are stored.

Also, the code conversion apparatus includes: a linear predictioncoefficients data decoding circuit configured to obtain data of firstlinear prediction coefficients from the first codes; an excitationsignal data decoding circuit configured to obtain data of firstexcitation signal from the first codes; a linear prediction coefficientsdata storage circuit configured to store the data of first linearprediction coefficients; an excitation signal data storage circuitconfigured to store the data of first excitation signal; a linearprediction coefficients data calculating circuit configured to calculatedata of first linear prediction coefficients from past data of firstlinear prediction coefficients which are stored; an excitation signaldata calculating circuit configured to calculate data of firstexcitation signal from past data of first excitation signal which arestored; a linear prediction coefficients data encoding circuitconfigured to obtain data of second linear prediction coefficients fromthe data of first linear prediction coefficients; and an excitationsignal data generating circuit configured to obtain data of secondexcitation signal from the data of first excitation signal.

Also, the code conversion apparatus can include a partial decodingcircuit configured to generate a first speech signal by driving a filterhaving any of first linear prediction coefficients derived from the dataof first linear prediction coefficients and second linear predictioncoefficients derived from the data of second linear predictioncoefficients by using a first excitation signal derived from the data offirst excitation signal; and an excitation signal data generatingcircuit configured to obtain data of second excitation signal from thefirst speech signal and any of the first linear prediction coefficientsand the second linear prediction coefficients.

Also, it is preferable that the data of excitation signal includes anyof an adaptive codebook data, a fixed codebook data and a gain data.

In another aspect of the present invention, a program that causes acomputer to perform processes is provided. The computer serves as a codeconversion apparatus which converts first codes based on a first systemto second codes based on a second system. The processes arecharacterized in that, when the first codes are unavailable, the secondcodes are obtained by directly using speech parameters which are everdecoded in accordance with the first system and are stored.

According to the program, the processes includes: a process of obtainingdata of first linear prediction coefficients from the first codes; aprocess of obtaining data of first excitation signal from the firstcodes; a process of storing the data of first linear predictioncoefficients; a process of storing the data of first excitation signal;a process of calculating data of first linear prediction coefficientsfrom past data of first linear prediction coefficients which are stored;a process of calculating data of first excitation signal from past dataof first excitation signal which are stored; a process of obtaining dataof second linear prediction coefficients from the data of first linearprediction coefficients; and a process of obtaining data of secondexcitation signal from the data of first excitation signal.

Also, the processes can include: a process of generating a first speechsignal by driving a filter having any of first linear predictioncoefficients derived from the data of first linear predictioncoefficients and second linear prediction coefficients derived from thedata of second linear prediction coefficients by using a firstexcitation signal derived from the data of first excitation signal; anda process of obtaining data of second excitation signal from the firstspeech signal and any of the first linear prediction coefficients andthe second linear prediction coefficients.

Here, it is preferable that the data of excitation signal includes anyof an adaptive codebook data, a fixed codebook data and a gain data.

The above-mentioned program can be stored in a recording medium.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram showing a configuration of a conventional codeconversion apparatus;

FIG. 2 is a diagram showing a configuration of a code conversionapparatus according to a first embodiment of the present invention;

FIG. 3 is a diagram showing a configuration of an LP coefficients codeconverting circuit in the first embodiment;

FIG. 4 is a diagram showing a configuration of a partial speech decodingcircuit in the first embodiment;

FIG. 5 is a diagram for showing correspondence between an ACB code andan ACB delay, and a method of translating ACB codes in the firstembodiment;

FIG. 6 is a diagram showing a configuration of a second excitationsignal data generating circuit in the first embodiment;

FIG. 7 is a diagram showing a configuration of an ACB code generatingcircuit in the first embodiment;

FIG. 8 is a diagram showing a configuration of an FCB code generatingcircuit in the first embodiment;

FIG. 9 is a diagram showing a configuration of a gain code generatingcircuit in the first embodiment;

FIG. 10 is a diagram showing a configuration of a code conversionapparatus according to a second embodiment of the present invention;

FIG. 11 is a flow chart showing procedures of a program according to thepresent invention; and

FIG. 12 is a flow chart showing procedures of a code conversion methodaccording to the present invention.

BEST MODE FOR CARRYING OUT THE INVENTION

A code conversion apparatus according to the present invention isdescribed below in detail with reference to the attached drawings.

FIG. 2 is a diagram showing a configuration of a code conversionapparatus according to a first embodiment of the present invention. Acode conversion method described below can be realized by the codeconversion apparatus shown in FIG. 2. Referring to FIG. 2, the codeconversion apparatus according to the first embodiment of the presentinvention includes an LP coefficients code converting circuit 1100 as alinear prediction coefficients code converting circuit, an LSP-LPCconverting circuit 1110, an impulse response calculating circuit 1120, apartial speech decoding circuit 1500, a second excitation signal datagenerating circuit 2600 as an excitation signal data generating circuit,a second excitation signal data calculating circuit 1610, and a secondexcitation signal data storage circuit 1620, a code multiplexing circuit20. Here, the same reference number is given to a component which isidentical to or similar to the component in the conventional techniqueshown in FIG. 1. In FIG. 2, an input terminal 10, an output terminal 20,a code demultiplexing circuit 1010, and a code multiplexing circuit 1020are basically the same as the components shown in FIG. 10 except that apart of the connections are diverged.

As shown in FIG. 12, the code conversion method according to the presentinvention includes the following steps.

Step a: Obtaining data of first LP coefficients from first codes.

Step b: Obtaining first LP coefficients from the data of first LPcoefficients.

Step c: Storing the data of first LP coefficients.

Step d: Calculating current data of first LP coefficients from the pastdata of first LP coefficients which are stored.

Step e: Obtaining data of second LP coefficients from the current dataof first LP coefficients.

Step f: Obtaining second LP coefficients from the data of second LPcoefficients.

Step g: Obtaining data of a first excitation signal from the firstcodes.

Step h: Storing the data of first excitation signal.

Step i: Calculating current data of first excitation signal from thepast data of first excitation signal which are stored.

Step j: Obtaining a first excitation signal from the data of firstexcitation signal.

Step k: Producing a first speech signal by driving a filter having thefirst LP coefficients or the second LP coefficients by using theexcitation signal.

Step l: Obtaining data of a second excitation signal from the first LPcoefficients, the second LP coefficients and the first speech signal.

By the above-mentioned steps according to the present invention, whenthe first codes are unavailable, the second codes can be obtained bydirectly using speech parameters which are decoded and stored in thepast based on the first system. It is thus possible to reduce thedeterioration in quality of the speech signal which is obtained bydecoding the second codes.

More specifically, according to the first system, the encoding of the LPcoefficients is carried out every T_(fr1) msec cycle (frame), and theencoding of the components of the excitation signal such as an ACB, anFCB and a gain is carried out every T_(sfr1)=T_(fr1)/N_(sfr1) msec cycle(sub-frame). On the other hand, according to the second system, theencoding of the LP coefficients is carried out every T_(fr2) msec cycle(frame), and the encoding of the components of the excitation signal iscarried out every T_(sfr2)=T_(fr2)/N_(sfr2) msec cycle (sub-frame).Also, the length of the frame, the number of sub-frames, and the lengthof the sub-frame in the first system are L_(fr1), N_(sfr1) andL_(sfr1)=L_(fr1)/N_(sfr1), respectively. The length of the frame, thenumber of sub-frames, and the length of the sub-frame in second systemare L_(fr2), N_(sfr2), and L_(sfr2)=L_(fr2)/N_(sfr2), respectively. Inthe description below, it is assumed for simplicity thatL_(fr1)=L_(fr2)=N_(sfr1)=N_(sfr2)=2, and L_(sfr1)=L_(sfr2). For example,when the sampling frequency is 8000 Hz, and the T_(fr1) and T_(fr2) are10 msec, L_(fr1) and L_(fr2) include 160 samples, and L_(sfr1) andL_(sfr2) include 80 samples.

The code demultiplexing circuit 1010 demultiplexes the first codesinputted through the input terminal 10 to obtain speech parameters,namely, codes corresponding to LP coefficients, an ACB, an FCB, an ACBgain and an FCB gain (an LP coefficients code, an ACB code, an FCB code,and a gain code). Here, the ACB gain and the FCB gain are encoded anddecoded collectively. For simplicity, these are referred to as a gain,and the code of the gain is referred to as a gain code. Also, the LPcoefficients code is outputted to the LP coefficients code convertingcircuit 1100 as a first LP coefficients code. The ACB code, the FCBcode, and the gain code are outputted to the partial speech decodingcircuit 1500 as a first ACB code, a first FCB code, and a first gaincode, respectively.

The LP coefficients code converting circuit 1100 obtains data of thefirst LP coefficients from the first codes which are based on the firstsystem, and stores the data.

Also, the LP coefficients code converting circuit 1100 calculates dataof the first LP coefficients from the past data of first LP coefficientswhich are stored, and then obtains data of second LP coefficients fromthe data of first LP coefficients. The LP coefficients code convertingcircuit 1100 receives the first LP coefficients code from the codedemultiplexing circuit 1010, and receives a frame lost flag through aninput terminal 45. The first LP coefficients code is decoded inaccordance with an LSP decoding method in the first system, and thus afirst LSP is obtained.

When the first codes are unavailable in the current frame due to apacket loss and the like, the LP coefficients code converting circuit1100 calculates the first LSP in the current frame from the first LSP inthe past which is obtained and stored in a past frame. Whether or not itis available in the current frame is notified by the above-mentionedframe lost flag. The first LSP is quantized and encoded in accordancewith an LSP quantization method and an encoding method in the secondsystem, and hence is converted into a second LSP and the correspondingcode (a second LP coefficients code). The second LP coefficients code isoutputted to the code multiplexing circuit 1020 as a code which isdecodable according to an LSP decoding method in the second system. Thefirst LSP and the second LSP are outputted to the LSP-LPC convertingcircuit 1110.

Here, according to the above-mentioned conventional art document No. 3and many standard systems such an ITU-T recommendation G.729, the LPcoefficients are expressed by a line spectral pair (LSP); (an LSP isused as the data of the LP coefficients). Since the LSP is often encodedand decoded, the encoding and the decoding of the LP coefficients arecarried out in an LSP region. As for the conversion from the LPcoefficients to the LSP and the conversion from the LSP to the LPcoefficients, a well-known method, for example, descriptions in thesection 5.2.3 and the section 5.2.4 of the conventional art document No.3 should be referred to.

The LSP-LPC converting circuit 1110 receives the first LSP and thesecond LSP outputted from the LP coefficients code converting circuit1100. The LSP-LPC converting circuit 1110 converts the first LSP tofirst LP coefficients and converts the second LSP to second LPcoefficients. The LSP-LPC converting circuit 1110 outputs the first LPcoefficients to the second excitation signal data generating circuit2600, the partial speech decoding circuit 1500 and the impulse responsecalculating circuit 1120, and outputs the second LP coefficients to thesecond excitation data generating circuit and the impulse responsecalculating circuit 1120. Here, as for the conversion from the LSP tothe LP coefficients, the description in the section 5.2.4 of theconventional art document No. 3 should be referred to.

The impulse response calculating circuit calculates impulse responses ofthe first LP coefficients and the second LP coefficients.

The partial speech decoding circuit 1500 obtains data of firstexcitation signal from the first codes, and stores the data. Also, thepartial speech decoding circuit 1500 calculates data of first excitationsignal from the past data of the first excitation signal which arestored in the past. Then, the partial speech decoding circuit 1500drives a filter having the first LP coefficients by using the firstexcitation signal, and thereby generates a first speech signal.

The excitation signal data generating circuit 2600 obtains data of thesecond excitation signal from the first LP coefficients, the second LPcoefficients and the first speech signal.

The second excitation signal data calculating circuit 1610 receives thesecond ACB signal, the second FCB signal, the second ACB gain and thesecond FCB gain which are outputted from the second excitation signaldata generating circuit 2600. The second excitation signal datacalculating circuit 1610 obtains a second excitation signal by adding asignal of the product of the second ACB signal and the second ACB gain,and a signal of the product of the second FCB signal and the second FCBgain. Then, the second excitation signal data calculating circuit 1610outputs the second excitation signal to the second excitation signaldata storage circuit 1620.

The second excitation signal data storage circuit 1620 receives thesecond excitation signal outputted from the second excitation signaldata calculating circuit 1610, and stores the received signal. Thesecond excitation signal data storage circuit 1620 outputs a secondexcitation signal which is inputted and stored in the past to an ACBcode generating circuit 2200 in the second excitation signal datagenerating circuit 2600.

The code multiplexing circuit 1020 receives the second LP coefficientscode, the second ACB code, the second FCB code and the second gain codeoutputted from the speech encoding circuit 1060. The code multiplexingcircuit 1020 multiplexes these codes, and outputs the obtained codes asthe second codes through the output terminal 20.

Next, the LP coefficients code converting circuit 1100 will be explainedwith reference to FIG. 3. FIG. 3 is a diagram showing a configuration ofthe LP coefficients code converting circuit 1100. Referring to FIG. 3,the LP coefficients code converting circuit 1100 includes an LSPcalculating circuit 117, an LSP decoding circuit 110, a first LSPcodebook 111, an LSP storage circuit 116, an LSP encoding circuit 130,and a second LSP codebook 131.

The first LSP codebook 111 stores a plurality of LSP sets. Also, thesecond LSP codebook 131 stores a plurality of LSP sets. The second LSPcalculating circuit 117 receives the frame lost flag through the inputterminal 45. When the frame lost flag notifies that the current frame isunavailable, the second LSP calculating circuit 117 receives a pastfirst LSP outputted from the LSP storage circuit 116. Then, the secondLSP calculating circuit 117 calculates a first LSP in the current frameby using the following equation, and outputs the first LSP to the LSPdecoding circuit 110. $\begin{matrix}{{{q_{j}(n)} = \frac{\sum\limits_{k = 1}^{N}{c_{k} \cdot {q_{j}\left( {n - k} \right)}}}{\sum\limits_{k = 1}^{N}c_{k}}},{j = 1},\ldots\quad,P} & (1)\end{matrix}$

In the above equation (1), q_(j)(n) is an LSP in the n-th frame, N is aconstant (2, for instance), c_(k) is a constant (for instance, c₁ is 0.9and c₂ is 0.1), and P is a linear prediction dimension (10, forinstance). As for the method of calculating an LSP in the current framefrom a past LSP, the above-mentioned conventional art No. 4 can bereferred to.

The LSP decoding circuit 110 receives the frame lost flag through theinput terminal 45. When the frame lost flag notifies that the currentframe is available, the LSP decoding circuit 110 receives through theinput terminal 31 the first LP coefficients code outputted from the codedemultiplexing circuit 1010. Then, the LSP decoding circuit 110 reads anLSP corresponding to the first LP coefficients code from the first LSPcodebook 111, and determines the read LSP as the first LSP. When theframe lost flag notifies that the current frame is unavailable, the LSPdecoding circuit 110 receives a first LSP from the LSP calculatingcircuit 117. Here, the decoding of the LP coefficients code into the LSPis in accordance with an LSP decoding method based on the first system,and the first LSP codebook 111 for the first system is used. The LSPdecoding circuit 110 outputs the first LSP to the LSP encoding circuit130 and the LSP storage circuit 116. In addition, the LSP decodingcircuit 110 outputs the first LSP to the LSP-LPC converting circuit 1110through the output terminal 33.

The LSP storage circuit 116 receives the first LSP outputted from theLSP decoding circuit 110, and stores the first LSP. When the frame lostflag inputted through the input terminal 45 notifies that the currentframe is unavailable, the LSP storage circuit 116 outputs the storedfirst LSP to the LSP decoding circuit 110.

The LSP encoding circuit 130 receives the first LSP outputted from theLSP decoding circuit 110. The LSP encoding circuit 130 reads second LSPsand the corresponding LP coefficients codes from the second LSP codebook131 sequentially, and selects a second LSP which has the minimumdeviation from the first LSP. Then, the LSP encoding circuit 130 outputsthe LP coefficients code corresponding to the selected second LSP as thesecond LP coefficients code to the code multiplexing circuit 1020through the output terminal 32. Also, the LSP encoding circuit 130outputs the second LSP to the LSP-LPC converting circuit 1110 throughthe output terminal 34. Here, the method of selecting the second LSP,namely, the method of quantizing and encoding the LSP is in accordancewith the method of quantizing and encoding the LSP based on the secondsystem, and the LSP codebook for the second system is used. Here, as forthe quantization and the encoding of the LSP, the description in thesection 5.2.5 of the conventional art document No. 3 can be referred to,for example.

Next, the partial speech decoding circuit 1500 will be explained belowin detail. The partial speech decoding circuit 1500 receives the firstACB code, the first FCB code, and the first gain code outputted from thecode demultiplexing circuit 1010. Further, The partial speech decodingcircuit 1500 receives the first LP coefficients from the LSP-LPCconverting circuit 1110, and receives the frame lost flag through theinput terminal 45. When the frame lost flag notifies that the currentframe is available, the partial speech decoding circuit 1500 decodes thefirst ACB code, the first FCB code and the first gain code to generate afirst ACB delay, a first FCB signal and a first gain by using the ACBsignal decoding method, the FCB signal decoding method and the gaindecoding method in the first system, respectively. When the frame lostflag notifies that the current frame is unavailable, the partial speechdecoding circuit 1500 uses a noise signal as a first FCB signal.Moreover, the partial speech decoding circuit 1500 calculates a firstACB delay and a first gain in the current frame from respective of thepast first ACB delay and the past first gain which are decoded andstored in a past frame. Then, the partial speech decoding circuit 1500produces a first ACB signal by using the first ACB delay. The partialspeech decoding circuit 1500 generates a first speech based on the firstACB signal, the first FCB signal, the first gain and the first LPcoefficients, and outputs the first speech to the ACB code generatingcircuit 2200. Here, the second LP coefficients can be used in place ofthe first LP coefficients.

Next, the partial speech decoding circuit 1500 is explained withreference to FIG. 4. FIG. 4 is a diagram showing a configuration of thepartial speech decoding circuit 1500. Referring to FIG. 4, the partialspeech decoding circuit 1500 includes an excitation signal data decodingcircuit 1600, an excitation signal data calculating circuit 1607, anexcitation signal data storage circuit 1606, an excitation signalstorage circuit 1570, an excitation signal calculating circuit 1540, anda synthesis filter 1580. Moreover, the excitation signal data decodingcircuit 1600 includes an ACB decoding circuit 1510, an FCB decodingcircuit 1520, a noise generating circuit 1526, and a gain decodingcircuit 1530. The excitation signal data calculating circuit 1607includes an ACB delay calculating circuit 1517 and a gain calculatingcircuit 1537. The excitation signal data storage circuit 1606 includesan ACB delay storage circuit 1516 and a gain storage circuit 1536.

The excitation signal data decoding circuit 1600 decodes a codecorresponding to data of excitation signal to generate the data ofexcitation signal. The ACB decoding circuit 1510, the FCB decodingcircuit 1520 and the gain decoding circuit 1530 of the excitation signaldata decoding circuit 1600 receive the first ACB code, the first FCBcode and the first gain code outputted from the code demultiplexingcircuit 1010 through input terminal 51, 52 and 53, respectively. The ACBdecoding circuit 1510, the FCB decoding circuit 1520 and the gaindecoding circuit 1530 decode respective of the first ACB code, the firstFCB code and the first gain code to generate respective of an ACB delay,an FCB signal and a gain, and output them as a first ACB delay, a firstFCB signal and a first gain, respectively. Here, the first gain includesthe ACB gain as the first ACB gain and the FCB gain as the first FCBgain. When the frame lost flag inputted through the input terminal 45indicates that the current frame is unavailable, the noise generatingcircuit 1526 of the excitation signal data decoding circuit 1600generates a noise signal as the first FCB signal, and supplies it to theFCB decoding circuit 1520. The ACB decoding circuit 1510 and the gaindecoding circuit 1530 receive respective of the first ACB delay and thefirst gain from respective of the ACB delay calculating circuit 1517 andthe gain calculating circuit 1537 of the excitation signal datacalculating circuit 1607. Moreover, the ACB decoding circuit 1510receives a past excitation signal that is outputted from the excitationsignal storage circuit 1570. The ACB decoding circuit 1510 generates anACB signal by using the past excitation signal and the first ACB delay,and outputs the ACB signal as a first ACB signal to the excitationsignal calculating circuit 1540. The FCB decoding circuit 1520 outputsthe first ACB signal to the excitation signal calculating circuit 1540.The gain decoding circuit 1530 outputs the first ACB gain and the firstFCB gain to the excitation signal calculating circuit 1540 and the gainstorage circuit 1536 of the excitation signal data storage circuit 1606.

When the frame lost flag inputted through the input terminal 45indicates that the current frame is not available, the excitation signaldata calculating circuit 1607 receives the past first ACB delay and thepast first gain, which is decoded and stored in a past frame, from thegain storage circuit 1536 of the excitation signal data storage circuit1606.

Then, the excitation signal data calculating circuit 1607 calculates thefirst ACB delay and the first gain in the current frame, and outputsthem to the gain decoding circuit 1530 of the excitation signal datadecoding circuit 1600.

The ACB delay storage circuit 1516 of the excitation signal data storagecircuit 1606 receives and stores the first ACB delay outputted from theexcitation signal data decoding circuit 1600. The gain storage circuitof the excitation signal data storage circuit 1606 receives and storesthe first gain from the gain decoding circuit 1530. When the frame lostflag inputted through the input terminal 45 indicates that the currentframe is unavailable, the excitation signal data storage circuit 1606outputs the stored past first ACB delay and the stored past first gainto the ACB delay calculating circuit 1517 and the gain calculatingcircuit 1537 of the excitation signal data calculating circuit 1607,respectively.

Described below in detail are the ACB decoding circuit 1510, the FCBdecoding circuit 1520, the gain decoding circuit 1530 and the noisegenerating circuit 1526 as the components of the excitation signal datadecoding circuit 1600. Moreover, the ACB delay calculating circuit 1517and the gain calculating circuit 1537 as the components of theexcitation signal data calculating circuit 1607 will be explained belowin detail. Furthermore, the ACB delay storage circuit 1516 and the gainstorage circuit 1536 as the components of the excitation signal datastorage circuit 1606 will be explained bellow in detail.

The ACB decoding circuit 1510 receives the past excitation signaloutputted from the excitation signal storage circuit 1570, and receivesthe frame lost flag through the input terminal 45. When the frame lostflag indicates that the current frame is available, the ACB decodingcircuit 1510 receives the first ACB code outputted from the codedemultiplexing circuit 1010 through the input terminal 51. Then, the ACBdecoding circuit 1510 calculates a first ACB delay T1 corresponding tothe first ACB code by using the correspondence between the ACB delay andthe ACB code in the first system shown in FIG. 5. When the frame lostflag indicates that the current frame is unavailable, the ACB decodingcircuit 1510 receives a first ACB delay T1 outputted from the ACB delaycalculating circuit 1517. A signal of L_(sfr1) samples corresponding tothe sub-frame length from a point at T1 samples before the beginning ofthe current sub-frame is cut out from the past excitation signal, andthus the first ACB signal is generated. Here, when T1 is smaller thanL_(sfr1), a vector corresponding to the T1 samples is cut out. Thevector is repeatedly connected, and hence a signal of L_(sfr1) samplesis produced. Then, the first ACB signal is outputted to the excitationsignal calculating circuit 1540. The first ACB delay is outputtedthrough an output terminal 62 to an ACB encoding circuit 2220 in an ACBcode generating circuit 2200 of the second excitation signal datagenerating circuit 2600. Here, as for the details of the method ofgenerating the first ACB signal, the description in the section 6.1 andthe section 5.6 of the conventional art document No. 3 should bereferred to.

The ACB delay calculating circuit 1517 receives the frame lost flagthrough the input terminal 45. When the frame lost flag indicates thatthe current frame is unavailable, the ACB delay calculating circuit 1517receives the past first ACB delay outputted from the ACB delay storagecircuit 1516. Then, the ACB delay calculating circuit 1517 calculates afirst ACB delay in the current frame by using the following equation,and outputs the first ACB delay to the ACB decoding circuit 1510.$\begin{matrix}{{d(n)} = \frac{\sum\limits_{k = 1}^{N}{c_{k} \cdot {d\left( {n - k} \right)}}}{\sum\limits_{k = 1}^{N}c_{k}}} & (2)\end{matrix}$

Here, d(n) is the ACB delay in the second sub-frame of the n-th frame, Nis a constant (2 for instance), c_(k) is a constant (for instance, c₁ is0.9 and c₂ is 0.1). As for the method of calculating the ACB delay inthe current frame from the past ACB delay, the description in thesection 6.2.3 of the conventional art document No. 4 may be referred to.

The ACB delay storage circuit 1516 receives the first ACB delayoutputted from the ACB decoding circuit 1510, and receives the framelost flag through the input terminal 45. Moreover, the ACB delay storagecircuit 1516 stores the first ACB delay. When the frame lost flagindicates that the current frame is unavailable, the stored first ACBdelay is outputted to the ACB delay calculating circuit 1517.

The FCB decoding circuit 1520 receives the frame lost flag through theinput terminal 45. When the frame lost flag indicates that the currentframe is available, the FCB decoding circuit 1520 receives through aninput terminal 52 the first FCB code outputted from the codedemultiplexing circuit 1010, and outputs the first FCB signalcorresponding to the first FCB code to the excitation signal calculatingcircuit 1540. Here, the decoding of the FCB code to the FCB signal is inaccordance with the decoding method for producing the FCB signal in thefirst system. When the frame lost flag indicates that the current frameis unavailable, the FCB decoding circuit 1520 receives the first FCBsignal outputted from the noise generating circuit 1526, and outputs thesignal to the excitation signal calculating circuit 1540. Here, the FCBsignal is often expressed by a multi-pulse signal defined by pulsepositions and pulse polarities. In this case, the first FCB codeconsists of a code associated with the pulse positions (a pulse positioncode) and a code associated with the pulse polarities (a pulse polaritycode). As for the details of the method of generating the FCB signalexpressed by the multi-pulse signal, the descriptions in the section 6.1and the section 5.7 of the conventional art document No. 3 can bereferred to.

The noise generating circuit 1526 receives the frame lost flag throughthe input terminal 45. When the frame lost flag notifies that thecurrent frame is unavailable, the noise generating circuit 1526generates a noise signal and outputs it to the FCB decoding circuit 1520as the first FCB signal. As for the method of generating the noisesignal, the description in the section 6.2.3 of the conventional artdocument No. 4 may be referred to.

The gain decoding circuit 1530 receives the frame lost flag through theinput terminal 45. When the frame lost flag indicates that the currentframe is available, the gain decoding circuit 1530 receives through aninput terminal 53 the first gain code outputted from the codedemultiplexing circuit 1010. Also, the gain decoding circuit 1530 readsa gain corresponding to the first gain code from the gain codebook inwhich a plurality of gains are stored. Here, the decoding of the gaincode to the gain is in accordance with the method of decoding forproducing the gain in the first system, and the gain codebook for thefirst system is used. The read gain, namely, the first ACB gaincorresponding to the ACB gain, and the first FCB gain corresponding tothe FCB gain are outputted to the excitation signal calculating circuit1540. When the frame lost flag indicates that the current frame isunavailable, the gain decoding circuit 1530 receives the first ACB gainand the first FCB gain outputted from the gain calculating circuit, andoutputs them to the excitation signal calculating circuit 1540. Here,when the first ACB gain and the first FCB gain are collectively encoded,a plurality of two-dimension vectors each of which consists of the firstACB gain and the first FCB gain are stored in the gain codebook. Also,when the first ACB gain and the first FCB gain are independentlyencoded, two gain codebooks are built in. In one of the gain codebooks,a plurality of first ACB gains are stored. In the other of the gaincodebooks, a plurality of first FCB gains are stored.

The gain calculating circuit 1537 receives the frame lost flag throughthe input terminal 45. When the frame lost flag indicates that thecurrent frame is unavailable, the gain calculating circuit 1537 receivesthe past first ACB gain and the past first FCB gain outputted from thegain storage circuit 1536. Then, the gain calculating circuit 1537calculates the first ACB gain and the first FCB gain in the currentframe by using the following equation, and outputs the calculated gainsto the gain decoding circuit 1530. $\begin{matrix}{{g(n)} = \frac{\sum\limits_{k = 1}^{N}{c_{k} \cdot {g\left( {n - k} \right)}}}{\sum\limits_{k = 1}^{N}c_{k}}} & (3)\end{matrix}$

Here, g (n) is the ACB gain or the FCB gain in the second sub-frame ofthe n-th frame, N is a constant (2 for instance), c_(k) is a constant(For instance, c₁ is 0.9 and c₂ is 0.1). As for the method ofcalculating the ACB gain and the FCB gain in the current frame fromrespective of the past ACB gain and the past FCB gain, the descriptionin the section 6.2.3 of the conventional art document No. 4 may bereferred to.

The gain storage circuit 1536 receives the first ACB gain and the firstFCB gain outputted from the gain decoding circuit 1530, and receives theframe lost flag through the input terminal 45. Also, the gain storagecircuit 1536 stores the first ACB gain and the first FCB gain. When theframe lost flag indicates that the current frame is unavailable, thegain storage circuit 1536 outputs the stored first ACB gain and thestored first FCB gain to the gain decoding circuit 1530.

The excitation signal calculating circuit 1540 receives the first ACBsignal outputted from the ACB decoding circuit 1510, the first FCBsignal outputted from the FCB decoding circuit 1520, and the first ACBgain and the first FCB gain outputted from the gain decoding circuit1530. The excitation signal calculating circuit 1540 calculates thefirst excitation signal by adding a signal of the product of the firstACB gain and the first ACB signal to a signal of the product of thefirst FCB gain and the first FCB signal. The first excitation signal isoutputted to the synthesis filter 1580 and the excitation signal storagecircuit 1570.

The excitation signal storage circuit 1570 receives and stores the firstexcitation signal outputted from the excitation signal calculatingcircuit 1540. The excitation signal storage circuit 1570 outputs to theACB decoding circuit 1510 the past first excitation signal which isinputted in the past and stored.

The synthesis filter 1580 receives the first excitation signal outputtedfrom the excitation signal calculating circuit 1540, and receivesthrough an input terminal 61 the first LP coefficients outputted fromthe LSP-LPC converting circuit 1110. The synthesis filter 1580 generatesa first speech by driving the linear prediction filter having the firstLP coefficients by using the first excitation signal. Then, thesynthesis filter 1580 outputs the first speech through an outputterminal 63 to a target signal calculating circuit 2210 in an ACB codegenerating circuit 2200 in the second excitation signal data generatingcircuit 2600. The second LP coefficients can be used in place of thefirst LP coefficients.

Now, FIG. 2 is referred to again. The second excitation signal datagenerating circuit 2600 receives the first LP coefficients and thesecond LP coefficients from the LSP-LPC converting circuit 1110, thefirst speech and the first ACB delay from the partial speech decodingcircuit 1500, the impulse response signal from the impulse responsecalculating circuit 1120, and the past second excitation signal storedin the second excitation signal data storage circuit 1620. The secondexcitation signal data generating circuit 2600 calculates a first targetsignal by using the first speech, the first LP coefficients and thesecond LP coefficients. Also, the second excitation signal datagenerating circuit 2600 calculates a second ACB delay, a second ACBsignal and an optimum ACB gain by using the past second excitationsignal, the impulse response signal, the first target signal and thefirst ACB delay. Then, the second excitation signal data generatingcircuit 2600 calculates a second target signal by using the first targetsignal, the second ACB signal, the optimum ACB gain and the impulseresponse signal, and hence obtains an FCB signal whose deviation fromthe second target signal is minimum. The obtained FCB signal is set as asecond FCB signal. A weighed square error between the first targetsignal and a reconstructed speech is calculated by using the firsttarget signal, the second ACB signal, the second FCB signal, the impulseresponse signal, and the ACB gain and the FCB gain stored in the gaincodebook. The second excitation signal data generating circuit 2600selects a second ACB gain and a second FCB gain with which the weighedsquare error is minimized. The second ACB signal, the second FCB signal,the second ACB gain and the second FCB gain are outputted to the secondexcitation signal data calculating circuit 1610. The codes which aredecodable in the second system and correspond to the second ACB delay,the second FCB signal, the second ACB gain and the second FCB gain areoutputted to the code multiplexing circuit 1020 as the second ACB code,the second FCB code, and the second gain code.

FIG. 6 is a diagram showing a configuration of the second excitationsignal data generating circuit 2600. Referring to FIG. 6, the secondexcitation signal data generating circuit 2600 includes an ACB codegenerating circuit 2200, an FCB code generating circuit 1300, and a gaincode generating circuit 1400.

The ACB code generating circuit 2200 receives the first LP coefficientsand the second LP coefficients from the LSP-LPC converting circuit 1110,the first speech and the first ACB delay from the partial speechdecoding circuit 1500, the impulse response signal from the impulseresponse calculating circuit 1120, and the past second excitation signalstored in the second excitation signal data storage circuit 1620. Then,the ACB code generating circuit 2200 calculates a first target signal byusing the first speech, the first LP coefficients and the second LPcoefficients. Next, the ACB code generating circuit 2200 calculates asecond ACB delay, a second ACB signal and an optimum ACB gain by usingthe past second excitation signal, the impulse response signal, thefirst target signal and the first ACB delay. The first target signal isoutputted to the FCB code generating circuit 1300 and the gain codegenerating circuit 1400. The optimum ACB gain is outputted to the FCBcode generating circuit 1300. The second ACB signal is outputted to theFCB code generating circuit 1300, the gain code generating circuit 1400,and the second excitation signal data calculating circuit 1610.Furthermore, the ACB code generating circuit 2200 outputs an code, whichis decodable in the second system and corresponds to the second ACBdelay, to the code multiplexing circuit 1020 as a second ACB code.

FIG. 7 is a diagram showing a configuration of the ACB code generatingcircuit 2200. Referring to FIG. 7, the ACB code generating circuit 2200includes a target signal calculating circuit 2210, an ACB encodingcircuit 2220, and an optimum ACB gain calculating circuit 2230.

The target signal calculating circuit 2210 receives through an inputterminal 57 the first speech outputted from the synthesis filter 1580 inthe partial speech decoding circuit 1500. Also, the target signalcalculating circuit 2210 receives the first LP coefficients and thesecond LP coefficients outputted from the LSP-LPC converting circuit1110 through an input terminal 36 and an input terminal 35,respectively. First, an audibility weighing filter W(z) is formed byusing the first LP coefficients. The audibility weighing filter isdriven by using the first speech, and thus an audibility weighed speechsignal is produced. Next, an audibility weighing synthesis filterW(z)/A2(z) is formed by using the first LP coefficients and the secondLP coefficients. A first target signal x(n) is obtained by subtractingfrom the audibility weighed speech signal a response of the audibilityweighing synthesis filter to zero input. The first target signal x(n) isoutputted to the ACB encoding circuit 2220 and the optimum ACB gaincalculating circuit 2230. Moreover, the first target signal x(n) is alsooutputted through an output terminal 78 to a second target signalcalculating circuit 1310 in the FCB code generating circuit 1300. As forthe details of the method of calculating the first target signal, thedescription in the section 5.5 of the conventional art document No. 3can be referred to.

The ACB encoding circuit 2220 receives the first target signal outputtedfrom the target signal calculating circuit 2210, receives through aninput terminal 58 the first ACB delay outputted from the ACB decodingcircuit 1510 in the partial speech decoding circuit 1500, receivesthrough an input terminal 74 the impulse response signal outputted fromthe impulse response calculating circuit 1120, and receives through aninput terminal 75 the past second excitation signal outputted from thesecond excitation signal data storage circuit 1620. By making theconvolution between the impulse response signal and a signal cut outfrom the past second excitation signal with the delay k, the ACBencoding circuit 2220 calculates filtered past excitation signalsy_(k)(n); n=0, . . . , L_(sfr2)−1 with the delay k. Next, a normalizedcross-correlation between y_(k)(n) and the first target signal x(n) iscalculated with respect to a certain delay k within a range whose centervalue is the first ACB delay. Then, a delay with which the normalizedcross-correlation takes a maximum value. This corresponds to selecting adelay with which the square error between x(n) and y_(k)(n) takes aminimum value. The selected delay is the second ACB delay d, and thesignal cut out from the past second excitation signal with the secondACB delay d is the second ACB signal v(n). Here, the normalizedcross-correlation Rxy(k) can be expressed by the following equation.$\begin{matrix}{{R_{ky}(k)} = \frac{\sum\limits_{k = 0}^{{Lsfr2} - 1}{{x(n)}{y_{k}(n)}}}{\sqrt{\sum\limits_{n = 0}^{{Lsfr2} - 1}{{y_{k}(n)}{y_{k}(n)}}}}} & (4)\end{matrix}$

A self-correlation R_(ss)(k) of the first target signal can be used inplace of R_(xy)(k) $\begin{matrix}{{R_{ss}(k)} = {\sum\limits_{n = 0}^{{Lsfr1} - 1}{{S_{w}(n)}{s_{w}\left( {n - k} \right)}}}} & (5)\end{matrix}$

Here, s_(w)(n) is the first target signal.

Also, a normalized self-correlation R′_(ss′)(k) expressed by thefollowing equation can be used in place of R_(ss)(k) $\begin{matrix}{{R_{ss}^{\prime}(k)} = \frac{R_{ss}(k)}{\sqrt{\sum\limits_{n = 0}^{{Lsfr1} - 1}{s_{w}^{2}\left( {n - k} \right)}}}} & (6)\end{matrix}$

In this case, for the purpose of reducing the computation load, it ispossible that a preliminary selection is carried out by using theself-correlation R_(ss)(k) and then a main selection from a plurality ofpreliminarily selected candidates is carried out by using the normalizedself-correlation R_(ss)′(k). The second ACB signal is outputted throughan output terminal 76 to a second target signal calculating circuit 1310in the FCB code generating circuit 1300, the gain code generatingcircuit 1400, and the second excitation signal data calculating circuit1610. The second ACB code corresponding to the second ACB delay isoutputted to the code multiplexing circuit 1020 through an outputterminal 54. The filtered past excitation signal yd(n) with the delay dis outputted to the optimum ACB gain calculating circuit 2230.

Here, the second ACB delay and the second ACB code can be obtained byusing the relationship of the code and the delay between the firstsystem and the second system, instead of the above-mentioned method inwhich the ACB delay is selected on the basis of the least square error.

Referring to FIG. 5, a translation of codes will be explained below.FIG. 5 shows a relationship of the code and the delay between the firstsystem and the second system. Let us consider a case, for example, wherethe ACB code iT1 is 56 and the corresponding ACB delay T1 is 76 in thefirst system. Also, let us consider a case where the ACB code iT2 is 53and the corresponding ACB delay T2 is 76 in the second system. In thiscase, in order to convert the ACB code from the first system to thesecond system such that the ACB delay becomes consistent with each other(76, in this case), the ACB code 56 in the first system is related tothe ACB code 53 in the second system. When a common ACB delay does notexist, a closest value is chosen, for example.

The optimum ACB gain calculating circuit 2230 receives the first targetsignal x(n) outputted from the target signal calculating circuit 2210,and receives the filtered past excitation signal Yd (n) with the delay dwhich is outputted from the ACB encoding circuit 2220. Here, the delay dis the second ACB delay. Next, the optimum ABC gain g_(p) is calculatedfrom the first target signal x(n) and y_(d)(n) on the basis of thefollowing equation. $\begin{matrix}{g_{p} = \frac{\sum\limits_{n = 0}^{{Lsfr2} - 1}{{x(n)}{y_{d}(n)}}}{\sum\limits_{n = 0}^{{Lsfr2} - 1}{{y_{d}(n)}{y_{d}(n)}}}} & (7)\end{matrix}$

The optimum ACB gain calculating circuit 2230 outputs the optimum ACBgain to a second target signal calculating circuit 1310 in the FCB codegenerating circuit 1300 through an output terminal 77. As for thedetails of the methods of calculating the second ACB signal andcalculating the optimum ACB gain, the description in the section 6.1 andthe section 5.6 of the conventional art document No. 3 should bereferred to.

The FCB code generating circuit 1300 receives the first target signal,the second ACB signal and the optimum ACB gain outputted from the ACBcode generating circuit 2200, and receives the impulse response signaloutputted from the impulse response calculating circuit 1120. The FCBcode generating circuit 1300 calculates the second target signal byusing the first target signal, the second ACB signal, the optimum ACBgain, and the impulse response signal. Next, the FCB code generatingcircuit 1300 obtains an FCB signal whose deviation from the secondtarget signal takes the minimum value, by using the second targetsignal, the FCB signal stored in a table built-in the FCB codegenerating circuit 1300, and the impulse response signal. The code,which is decodable in the second system and corresponds to the FCBsignal, is outputted to the code multiplexing circuit 1020 as the secondFCB code. The calculated FCB signal is outputted to the gain codegenerating circuit 1400 and the second excitation signal calculation1610 as the second FCB signal.

FIG. 8 is a diagram showing a configuration of the FCB code generatingcircuit 1300. Referring to FIG. 8, the FCB code generating circuit 1300includes a second target signal calculating circuit 1310 and an FCBencoding circuit 1320. The second target signal calculating circuit 1310receives through an input terminal 81 the first target signal outputtedfrom the target signal calculating circuit 2210 in the ACB codegenerating circuit 2200, and receives through an input terminal 84 theimpulse response signal outputted from the impulse response calculatingcircuit 1120. Further, the second target signal calculating circuit 1310receives through an input terminal 83 the second ACB signal outputtedfrom the ACB encoding circuit 2220 in the ACB code generating circuit2200, and receives through an input terminal 82 the optimum ACB gainoutputted from the optimum ACB gain calculating circuit 2230 in the ACBcode generating circuit 2200. Filtered second ACB signals y(n); n=0, . .. , L_(sfr1)−1 are calculated by making the convolution between thesecond ACB signal and the impulse response signal. Then, the secondtarget signal x′(n) is obtained by subtracting a signal of the productof the optimum ACB gain and Y(n) from the first target signal. Then, thesecond target signal is outputted to the FCB encoding circuit 1320.

The FCB encoding circuit 1320 receives the second target signaloutputted from the second target signal calculating circuit 1310, andreceives through an input terminal 84 the impulse response signaloutputted from the impulse response calculating circuit 1120. The FCBencoding circuit 1320 includes a table in which a plurality of FCBsignals are stored. The FCB encoding circuit 1320 reads the FCB signalssequentially from the table, and sequentially calculates the filteredFCB signals z(n); n=0, . . . , L_(sfr2)−1 by making the convolutionbetween the FCB signal and the impulse response signal. Next, the FCBencoding circuit 1320 sequentially calculates normalizedcross-correlations between the z(n) and the second target signal x′(n),and selects an FCB signal with which the normalized cross-correlationtakes the maximum value. This corresponds to selecting an FCB signalwith which the square error between x′(n) and z(n) takes the minimumvalue. Here, the normalized cross-correlation R_(x′z)(k) is expressed asthe following equation. $\begin{matrix}{g_{p} = \frac{\sum\limits_{n = 0}^{{Lsfr2} - 1}{{x^{\prime}(n)}{z(n)}}}{\sqrt{\sum\limits_{n = 0}^{{Lsfr2} - 1}{{z(n)}{z(n)}}}}} & (8)\end{matrix}$

The selected FCB signal is used as the second FCB signal c(n). The code,which is decodable in the second system and corresponds to the secondFCB signal, is outputted as the second FCB code to the code multiplexingcircuit 1020 through an output terminal 55. The second FCB signal isoutputted through an output terminal 85 to the gain encoding circuit1410 in the gain code generating circuit 1400 and the second excitationsignal calculation 1610. With regard to the method of expressing the FCBsignal, a multi-pulse signal which includes a plurality of pulses and isdefined by pulse positions and pulse polarities can be used forefficiently expressing the FCB signal. In this case, the second FCB codecorresponds to the pulse positions and the pulse polarities. As for thedetails of the encoding when the FCB signal is expressed by themulti-pulses, the description in the section 3.8 of the conventional artdocument No. 3 can be referred to.

Here, a similar method as in the LP coefficients code converting circuit1100 can used instead of the above-mentioned method in which the FCBsignal is selected on the basis of the least square root in the speechregion. That is to say, the first FCB signal obtained in the partialspeech decoding circuit 1500 is inputted, and an FCB signal whosedeviation from the first FCB signal takes a minimum value is selected asthe second FCB signal from the table of the FCB signal in the secondsystem.

Moreover, when the FCB signal is expressed by the multi-pulses, therelationship of the pulse positions, the pulse polarities and the codesbetween the first system and the second system can be used according toa method similar to that in the ACB code generating circuit 2200. Thatis to say, the codes are translated by relating the values of the pulseposition and the pulse polarity in the first system to those in thesecond system to be identical.

The gain code generating circuit 1400 receives the first target signaland the second ACB signal outputted from the ACB code generating circuit2200, receives the second FCB signal outputted from the FCB codegenerating circuit 1300, and receives the impulse response signaloutputted from the impulse response calculating circuit 1120. A weighedsquare error between the first target signal and the reconstructedspeech is calculated by using the first target signal, the second ACBsignal, the second FCB signal, the impulse response signal, and the ACBgain and the FCB gain stored in the table built-in the gain codegenerating circuit 1400. The gain code generating circuit 1400 selectsan ACB gain and an FCB gain with which the weighed square error takes aminimum value. The code, which is decodable in the second system andcorresponds to the selected ACB gain and the selected FCB gain, isoutputted to the code multiplexing circuit 1020 as a second gain code.Moreover, the selected ACB gain and the selected FCB gain are outputtedto the second excitation signal data calculating circuit 1610 as asecond ACB gain and a second FCB gain, respectively.

FIG. 9 is a diagram showing a configuration of the gain code generatingcircuit 1400. Referring to FIG. 8, the gain code generating circuit 1400includes a gain encoding circuit 1410 and a gain codebook 1411. The gainencoding circuit 1410 receives through an input terminal 93 the firsttarget signal outputted from the target signal calculating circuit 2210in the ACB code generating circuit 2200, and receives through an inputterminal 92 the second ACB signal outputted from the ACB encodingcircuit 2220 in the ACB code generating circuit 2200. Further, the gainencoding circuit 1410 receives through an input terminal 91 the secondFCB signal outputted from the FCB encoding circuit 1320 in the FCB codegenerating circuit 1300, and receives through an input terminal 94 theimpulse response signal outputted from the impulse response calculatingcircuit 1120. The gain encoding circuit 1410 includes a table in which aplurality of ACB gains and a plurality of FCB gains are stored. The gainencoding circuit 1410 reads the ACB gains and the FCB gains from thetable sequentially, and calculates sequentially a weighed reconstructionspeech by using the second ACB signal, the second FCB signal, theimpulse response signal, the ACB gain, and the FCB gain. Also, the gainencoding circuit 1410 sequentially calculates square errors between theweighed reconstruction speeches and the first target signals, andselects an ACB gain and an FCB gain with which the square error takes aminimum value. Here, the square error is expressed by the followingequation. $\begin{matrix}{E = {\sum\limits_{x = 0}^{{Lsfr2} - 1}\left( {{x(n)} - \left( {{g_{p}^{\prime} \cdot {z(n)}} - {g_{c}^{\prime}{y(n)}}} \right)} \right)^{2}}} & (9)\end{matrix}$

It should be noted that g′_(p) and g′_(c) are the ACB gain and the FCBgain, respectively. Also, the y(n) is the filtered second ACB signal,which can be obtained by making the convolution between the second ACBsignal and the impulse response signal. The z(n) is the filtered secondFCB signal, which can be obtained by making the convolution between thesecond FCB signal and the impulse response signal. The weighedreconstruction speech is expressed by the following equation.ŝ(n)=g _(p) ^(′) ·z(n)+g_(c) ^(′) ·y(n)  (10)

The code, which is decodable in the second system and corresponds to theselected ACB gain and the selected FCB gain, is outputted as the secondgain code to the code multiplexing circuit 1020 through an outputterminal 56. Further, the ACB gain and the FCB gain are outputted to thesecond excitation signal data calculating circuit 1610 through outputterminals 95 and 96 as the second ACB gain and the second FCB gain,respectively.

Here, a method as in the LP coefficients code converting circuit 1100can be used instead of the above-mentioned method in which the gain isselected on the basis of the least square error in the speech region.That is to say, the first gain obtained in the partial speech decodingcircuit 1500 is inputted, and then a gain whose deviation from the firstgain takes a minimum value is selected as the second gain from the tableof the gains in the second system (the gain codebook in the secondsystem).

The impulse response calculating circuit 1120 receives the first LPcoefficients and the second LP coefficients outputted from the LSP-LPCconverting circuit 1110, and makes the audibility weighing synthesisfilter by using the first LP coefficients and the second LPcoefficients. Further, the impulse response calculating circuit 1120outputs the impulse response signal of the audibility weighing synthesisfilter to the ACB encoding circuit 2220, the second target signalcalculating circuit 1310, the FCB encoding circuit 1320, and the gainencoding circuit 1410. Here, the ACB encoding circuit 2220 is in the ACBcode generating circuit 2200 of the second excitation signal datagenerating circuit 2600. The second target signal calculating circuit1310 and the FCB encoding circuit 1320 are in the FCB code generatingcircuit 1300 of the second excitation signal data generating circuit2600. The gain encoding circuit 1410 is in the gain code generatingcircuit 1400 of the second excitation signal data generating circuit2600. As for the details of the method of calculating the impulseresponse signal of the audibility weighing synthesis filter, thedescription in the section 5.4 of the conventional art document No. 3can be referred to.

The second excitation signal data calculating circuit 1610 receives thesecond ACB signal outputted from the ACB code generating circuit 2200 inthe second excitation signal data generating circuit 2600, receives thesecond FCB signal outputted from the FCB code generating circuit 1300 inthe second excitation signal data generating circuit 2600, and receivesthe second ACB gain and the second FCB gain outputted from the gain codegenerating circuit 1400 in the second excitation signal data generatingcircuit 2600. The second excitation signal is obtained by adding asignal of the product of the second ACB gain and the second ACB signalto a signal of the product of the second FCB gain and the second FCBsignal. Then, the second excitation signal data calculating circuit 1610outputs the second excitation signal to the second excitation signaldata storage circuit 1620.

The second excitation signal data storage circuit 1620 receives andstores the second excitation signal outputted from the second excitationsignal data calculating circuit 1610. Then, the second excitation signaldata storage circuit 1620 outputs the second excitation signal which isinputted in the past and stored to the ACB code generating circuit 2200in the second excitation signal data generating circuit 2600.

The above-mentioned code conversion apparatus in the first embodiment ofthe present invention can be realized by a control of a computer such asa digital signal processing processor and the like. As a secondembodiment of the present invention, FIG. 10 schematically shows adevice configuration in which the code conversion processing in thefirst embodiment is achieved by a computer. Referring to FIG. 10, acomputer 1 includes a CPU (Central Processing Unit) 2, a memory 3, and arecording medium readout device interface 4. A recording medium readoutdevice 5 having a recording medium 6 is provided independently of thecomputer 1. The recording medium 6 stores a computer program to executethe following processes:

(A) a process of obtaining data of first LP coefficients from the firstcodes;

(B) a process of obtaining data of first excitation signal from thefirst codes;

(C) a process of storing the data of first LP coefficients;

(D) a process of storing the data of first excitation signal;

(E) a process of calculating data of first LP coefficients from the pastdata of first LP coefficients which are stored;

(F) a process of calculating data of first excitation signal from thepast data of first excitation signal which are stored;

(G) a process of obtaining data of second LP coefficients from the dataof first LP coefficients; and

(H) a process of obtaining data of second excitation signal from thedata of first excitation signal.

More specifically, in the computer 1 executing the program read out fromthe recording medium 6, the code conversion processing is carried out inwhich the first codes obtained by encoding a speech in a firstencoding-decoding apparatus are converted into the second codes whichare decodable in a second encoding-decoding apparatus. As shown in FIG.12, the recording medium 6 stores a computer program to execute thefollowing processes:

(a) a process of obtaining data of first LP coefficients from the firstcodes;

(b) a process of obtaining first LP coefficients from the data of firstLP coefficients;

(c) a process of storing the data of first LP coefficients;

(d) a process of calculating data of first LP coefficients from the pastdata of first LP coefficients which are stored;

(e) a process of obtaining data of second LP coefficients from the dataof first LP coefficients;

(f) a process of obtaining second LP coefficients from the data ofsecond LP coefficients;

(g) a process of obtaining data of a first excitation signal from thefirst codes;

(h) a process of storing the data of first excitation signal;

(i) a process of calculating data of first excitation signal from thepast data of first excitation signal which are stored;

(j) a process of obtaining a first excitation signal from the data offirst excitation signal;

(k) a process of producing a first speech signal by driving a filterhaving the first LP coefficients or the second LP coefficients by usingthe excitation signal; and

(l) a process of obtaining data of a second excitation signal from thefirst LP coefficients, the second LP coefficients and the first speechsignal.

The program stored in the recording medium 6 is read out to the memory 3through the recording medium readout device 5 and the recording mediumreadout device interface 4, and then is executed. The above-mentionedprogram may be stored in a nonvolatile memory such as a flash memory, amask ROM and the like. The recording medium includes a nonvolatilememory, a CD-ROM, an FD, a digital versatile disk (DVD), a magnetic tape(MT), a portable HDD and so on. Moreover, the recording medium mayinclude a communication medium of wired or wireless communication totransmit the program, for example, when the program is transmitted froma server to a computer.

According to the present invention, as described above, it is possibleto reduce the deterioration in quality of the speech signal decoded fromthe second codes, the deterioration being caused by a process in which aspeech signal with deterioration generated from the past speechparameters in the first system is re-analyzed and decoded in the secondsystem, when the first codes is unavailable. The reason is comes from afact that the present invention is designed such that the second codesare obtained by using directly the speech parameters which are obtainedin the past according to the first system and stored.

1. (canceled)
 2. A method of converting code which converts first codesbased on a first system to second codes based on a second system,comprising: obtaining data of first linear prediction coefficients fromsaid first codes; obtaining data of first excitation signal from saidfirst codes; storing said data of first linear prediction coefficients;storing said data of first excitation signal; calculating current dataof first linear prediction coefficients from past data of first linearprediction coefficients which are stored; calculating current data offirst excitation signal from past data of first excitation signal whichare stored; obtaining data of second linear prediction coefficients fromsaid current data of first linear prediction coefficients; and obtainingdata of second excitation signal from said current data of firstexcitation signal, wherein when said first codes are unavailable, saidsecond codes are obtained by directly using speech parameters which areever decoded in accordance with said first system and are stored.
 3. Themethod of converting code according to claim 2, further comprising:generating a first speech signal by driving a filter having any of firstlinear prediction coefficients derived from said current data of firstlinear prediction coefficients and second linear prediction coefficientsderived from said data of second linear prediction coefficients by usinga first excitation signal derived from said current data of firstexcitation signal; and obtaining data of second excitation signal fromsaid first speech signal and any of said first linear predictioncoefficients and said second linear prediction coefficients.
 4. Themethod of converting code according to claim 2, wherein said data ofexcitation signal includes any of an adaptive codebook data, a fixedcodebook data and a gain data.
 5. (canceled)
 6. A code conversionapparatus, which converts first codes based on a first system to secondcodes based on a second system, comprising: a linear predictioncoefficients data decoding circuit configured to obtain data of firstlinear prediction coefficients from said first codes; an excitationsignal data decoding circuit configured to obtain data of firstexcitation signal from said first codes; a linear predictioncoefficients data storage circuit configured to store said data of firstlinear prediction coefficients; an excitation signal data storagecircuit configured to store said data of first excitation signal; alinear prediction coefficients data calculating circuit configured tocalculate current data of first linear prediction coefficients from pastdata of first linear prediction coefficients which are stored; anexcitation signal data calculating circuit configured to calculatecurrent data of first excitation signal from past data of firstexcitation signal which are stored; a linear prediction coefficientsdata encoding circuit configured to obtain data of second linearprediction coefficients from said current data of first linearprediction coefficients; and an excitation signal data generatingcircuit configured to obtain data of second excitation signal from saidcurrent data of first excitation signal, wherein when said first codesare unavailable, said second codes are obtained by directly using speechparameters which are ever decoded in accordance with said first systemand are stored.
 7. The code conversion apparatus according to claim 6,further comprising: a partial decoding circuit configured to generate afirst speech signal by driving a filter having any of first linearprediction coefficients derived from said current data of first linearprediction coefficients and second linear prediction coefficientsderived from said data of second linear prediction coefficients by usinga first excitation signal derived from said current data of firstexcitation signal; and an excitation signal data generating circuitconfigured to obtain data of second excitation signal from said firstspeech signal and any of said first linear prediction coefficients andsaid second linear prediction coefficients.
 8. The code conversionapparatus according to claim 6, wherein said data of excitation signalincludes any of an adaptive codebook data, a fixed codebook data and again data.
 9. (canceled)
 10. A computer program product embodied on acomputer-readable medium and comprising code that when executed, causesa computer to perform processes, said computer serving as a codeconversion apparatus which converts first codes based on a first systemto second codes based on a second system, said processes comprising: aprocess of obtaining data of first linear prediction coefficients fromsaid first codes; a process of obtaining data of first excitation signalfrom said first codes; a process of storing said data of first linearprediction coefficients; a process of storing said data of firstexcitation signal; a process of calculating current data of first linearprediction coefficients from past data of first linear predictioncoefficients which are stored; a process of calculating current data offirst excitation signal from past data of first excitation signal whichare stored; a process of obtaining data of second linear predictioncoefficients from said current data of first linear predictioncoefficients; and a process of obtaining data of second excitationsignal from said current data of first excitation signal, wherein whensaid first codes are unavailable, said second codes are obtained bydirectly using speech parameters which are ever decoded in accordancewith said first system and are stored.
 11. The computer program productaccording to claim 10, wherein said processes further comprising: aprocess of generating a first speech signal by driving a filter havingany of first linear prediction coefficients derived from said currentdata of first linear prediction coefficients and second linearprediction coefficients derived from said data of second linearprediction coefficients by using a first excitation signal derived fromsaid current data of first excitation signal; and a process of obtainingdata of second excitation signal from said first speech signal and anyof said first linear prediction coefficients and said second linearprediction coefficients.
 12. The computer program product according toclaim 10, wherein said data of excitation signal includes any of anadaptive codebook data, a fixed codebook data and a gain data. 13.(canceled)
 14. The method of converting code according to claim 3,wherein said data of excitation signal includes any of an adaptivecodebook data, a fixed codebook data and a gain data.
 15. The codeconversion apparatus according to claim 7, wherein said data ofexcitation signal includes any of an adaptive codebook data, a fixedcodebook data and a gain data.
 16. The computer program productaccording to claim 11, wherein said data of excitation signal includesany of an adaptive codebook data, a fixed codebook data and a gain data.